#include "worker.h"
#include <QThread>

Worker::Worker(QObject *parent)
    : QObject{parent}
{



}

Worker::~Worker()
{
}



void Worker::doWork()
{
    // 模拟耗时操作
    for (int i = 0; i < 10; ++i) {
        QThread::msleep(500);
        emit sendData(QString("Data %1").arg(i));
    }
    emit finished();
}
